package com.cskaoyan.converter;
import com.cskaoyan.bean.Order;
import com.cskaoyan.bean.vo.OrderInfo;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.Mapper;

@Mapper(componentModel = "spring")
public interface OrderConverter {
    @Mappings({
            @Mapping(source = "consignee",target = "consignee"),
            @Mapping(source = "address",target = "address"),
            @Mapping(source = "addTime",target = "addTime"),
            @Mapping(source = "orderSn",target = "orderSn"),
            @Mapping(source = "actualPrice",target = "actualPrice"),
            @Mapping(source = "mobile",target = "mobile"),
            @Mapping(source = "goodsPrice",target = "goodsPrice"),
            @Mapping(source = "couponPrice",target = "couponPrice"),
            @Mapping(source = "freightPrice",target = "freightPrice"),
    })
    OrderInfo order2Info(Order order);

}
